import { defineStore } from 'pinia'

/**
 * 后端返回原始路由(未处理时)
 * @function setCacheKeepAlive 设置接口原始路由数据
 */
export const useBasic = defineStore('basic', {
  state: () => ({
    count: 0,
    deep: {
      count: 0
    }
  }),
  getters: {
    deepCount(state) {
      return state.deep.count
    }
  },
  actions: {
    async add() {
      this.count++
      this.deep.count++
    }
  }
})
